<?
class My_Controller_Plugin_Init extends Zend_Controller_Plugin_Abstract
{
	private $_view;
	public function __construct($view){
		$this->_view = $view;
	}
	public function preDispatch(Zend_Controller_Request_Abstract $request)
	{
		$this->_view->baseUrl = $request->getBaseUrl();
        $this->_view->lang = Zend_Registry::get('lang');
		$this->_view->controller = $request->getControllerName();
		$this->_view->action = $request->getActionName();
		$this->_view->query = '';
		$qs = $_SERVER['QUERY_STRING'];
		if(isset($qs) && $qs != ''){
			$this->_view->query = '/?' . $qs;
		}
	}
}